import request from '@/utils/request'

export function listWarehouse(query) {
  return request({
    url: '/manage/warehouse/list',
    method: 'get',
    params: query
  })
}

export function getMechanismList(query) {
  return request({
    url: '/manage/warehouse/getMechanismName',
    method: 'get',
    params: query
  })
}


// 新增岗位
export function add(data) {
  return request({
    url: '/manage/warehouse/add',
    method: 'post',
    data: data
  })
}


// 合并仓库
export function together2(data) {
  return request({
    url: '/manage/warehouse/together',
    method: 'put',
    data: data
  })
}


// 删除岗位
export function del(id) {
  return request({
    url: '/manage/warehouse/del/' + id,
    method: 'delete'
  })
}



// 查询岗位详细
export function getPost(postId) {
  return request({
    url: '/system/post/' + postId,
    method: 'get'
  })
}

// 修改岗位
export function updatePost(data) {
  return request({
    url: '/system/post',
    method: 'put',
    data: data
  })
}
